import sounddevice as sd
for i, dev in enumerate(sd.query_devices()):
    print(f"{i}: {dev['name']} (输入通道: {dev['max_input_channels']})")